home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
7_7.lha
/
7_7
/
7_7.h
< prev
next >
Wrap
Text File
|
1993-08-08
|
793b
|
35 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ an iterator for a doubly-linked list
lass dlist_iterator
dlink *curr;
dlist *curr_dlist;
ublic:
dlist_iterator(dlist &d)
{ curr_dlist = &d; curr = 0; }
// set current pointer to the ends of the list
void reset() { curr = 0; }
// move around the list, leaving the links there
int next(ent &e);
int prev(ent &e);
// move around the list, removing the links
int getnext(ent &e);
int getprev(ent &e);
// manipulate around the beginning
// and end of the list
void insert(ent e);
void append(ent e);
// manipulate around the current entry
void inserthere(ent e);
void appendhere(ent e);
;